package com.si.control;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public abstract class ActionHandler<E extends Enum<E>> implements ActionListener {

	@Override
	public void actionPerformed(final ActionEvent e) {
		this.handle(this.parse(e.getActionCommand()));
	}
	
	protected abstract E parse(final String str);
	
	protected abstract void handle(final E command);
}
